package com.kaoshi.user.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kaoshi.user.pojo.OperationLog;
import com.kaoshi.user.mapper.OperationLogMapper;
import com.kaoshi.user.service.OperationLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author author
 * @since 2024-11-01
 */
@Service
public class OperationLogServiceImpl extends ServiceImpl<OperationLogMapper, OperationLog> implements OperationLogService {
    @Resource
    private OperationLogMapper operationLogMapper;

    @Override
    public Page<OperationLog> findPage(Integer page, Integer size, OperationLog operationLog) {
        Page<OperationLog> page1 = new Page<>(page, size);
        return operationLogMapper.findPage(page1, operationLog);
    }

    @Override
    public void add(OperationLog operationLog) {
        operationLogMapper.insert(operationLog);
    }
}
